package fem2;

import fem2.analysis.Analysis;
import fem2.observer.TimeStepObserver;
import fem2.strategies.Strategy;

public abstract class AbstractStructuralDynamicsDemo extends AbstractStructuralStaticDemo {

	public abstract Analysis createAnalysis(Model m);

	@Override
	public void run() {
		Model m = createModel();

		Analysis an = createAnalysis(m);

		Strategy s = an.getStrategy();

		addObservers(m, s, new TimeStepObserver(s));

		an.run();

		Debugger.warn("Dynamics analysis completed");
	}

	@Override
	public void run(int nt) {
		throw new NotImplementedError();
	}

	@Override
	public void run(double[] lambda) {
		throw new NotImplementedError();
	}
}
